package com.iris.webService.server;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.jws.WebService;
import javax.xml.ws.Endpoint;

import com.iris.webService.server.vo.BeanTest;

@WebService
public class ServerTest {
	
	public String getValue(String name){
		return "getValue="+name;
	}

	public List<BeanTest> getBeanList(){
		List<BeanTest> list=new ArrayList<BeanTest>();
		BeanTest bt1=new BeanTest("1", 1);
		BeanTest bt2=new BeanTest("2", 2);
		list.add(bt2);
		list.add(bt1);
		return list;
	}

	//这里返回Map报错..
//	public Map<String,String> getMap(){
//		Map<String,String> map=new HashMap<String,String>();
//		map.put("1", "1");
//		return map;
//	}
	public static void main(String[] args) {
		Endpoint.publish("http://localhost:9001/Service/ServerTest", new ServerTest());
		System.out.println("ok==ServerTest");
	}


}
